<%@ include file="/includes/taglibs.jsp"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>
<%@ page contentType="text/html; charset=UTF-8"%>
<%@ page import="com.cq.xjms.model.User"  %>
<%@ page import="com.cq.xjms.model.Teacher" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" href="<%=request.getContextPath()%>/css/common.css" type="text/css" />
<title>左侧导航栏</title>
<script type="text/javascript" src="<%=request.getContextPath()%>/js/jquery-1.4.2.min.js"></script>
<script type="text/javascript">
	function outlook() 
	{ 
		this.changeSecondMenu = changeSecondMenu;
	} 
	var outlookbar=new outlook();
	function changeSecondMenu(menuId){
		$("#right_main_nav div").hide();
		$("#menu"+menuId).show();
	}
	function gotoUrl(url,title){
		window.top.frames['manFrame'].window.location.href=url;
		window.top.frames['tagFrame'].window.setTitle(title);
	}
	
</script>
<%
	Object obj = request.getSession().getAttribute("login_user");
	String name = null;
	if(obj!=null && obj instanceof User){
		name = ((User)obj).getName();
	}else if(obj!=null && obj instanceof Teacher){
		name = ((Teacher)obj).getName();
	}
 %>
</head>
<body >
  <div id="left_content">
	<div id="user_info">
		欢迎您，<strong><%=name %></strong> <br/>
		[<!--<a href="#"></a>， --><a href="javascript:gotoUrl('sys/queryById.action','个人信息')">个人信息</a>, <a href="logout.action">退出</a>]
	</div>
	<div id="main_nav">
		<div id="right_main_nav">
			<div id="menu0" class="list_detail" >
				<ul>
			       <li  class="bg_image" onclick="gotoUrl('sys/queryById.action','个人信息')">个人信息</li>
				</ul>
			</div>
			<div id="menu1" class="list_detail"  style="display:none;">
				<ul>
			       <li  class="bg_image" onclick="gotoUrl('sys/addUser.action','添加用户')">添加用户</li>
			       <li  class="bg_image" onclick="gotoUrl('sys/queryUser.action','查询用户')">查询用户</li>
			       <li  class="bg_image" onclick="gotoUrl('sys/addInstitute.action','添加学院')">添加学院</li>
			       <li  class="bg_image" onclick="gotoUrl('sys/listInstitute.action','学院列表')">学院列表</li>
			       <li  class="bg_image" onclick="gotoUrl('sys/addDepartment.action','添加专业')">添加专业</li>
			       <li  class="bg_image" onclick="gotoUrl('sys/listDepartment.action','专业列表')">专业列表</li>
			       
				</ul>
			</div>
			<div id="menu2" class="list_detail" style="display:none;">
				<ul>
				   <% if(obj instanceof User){ %>
			       <li  class="bg_image" onclick="gotoUrl('sys/addStudent.action','添加学生')">添加学生</li>
			       <%} %>
			       <li  class="bg_image" onclick="gotoUrl('sys/listStudent.action','查询学生')">查询学生</li>
			       <li  class="bg_image" onclick="gotoUrl('sys/electiveCourse.action','选修课程')">选修课程</li>
				</ul>
			</div>
			<div id="menu3" class="list_detail" style="display:none;">
				<ul>
				<% if(obj instanceof User){ %>
			       <li  class="bg_image" onclick="gotoUrl('sys/addClazz.action','添加班级')">添加班级</li>
			    <%} %>   
			       <li  class="bg_image" onclick="gotoUrl('sys/listClazz.action','查询班级')">查询班级</li>
				</ul>
			</div>
			<div id="menu4" class="list_detail" style="display:none;">
				<ul>
				<% if(obj instanceof User){ %>
			       <li  class="bg_image" onclick="gotoUrl('sys/addCourse.action','添加课程')">添加课程</li>
			     <%} %>  
			       <li  class="bg_image" onclick="gotoUrl('sys/listCourse.action','查询课程')">查询课程</li>
				</ul>
			</div>
			<div id="menu5" class="list_detail" style="display:none;">
				<ul>
			       <li  class="bg_image" onclick="gotoUrl('sys/addScore.action','添加成绩')">添加成绩</li>
			       <li  class="bg_image" onclick="gotoUrl('sys/listScore.action','查询成绩')">查询成绩</li>
			       <li  class="bg_image" onclick="gotoUrl('sys/importInit.action','导入成绩')">导入成绩</li>
				</ul>
			</div>
			<div id="menu6" class="list_detail" style="display:none;">
				<ul>
				<% if(obj instanceof User){ %>
			       <li  class="bg_image" onclick="gotoUrl('sys/addTeacher.action','添加教师')">添加教师</li>
			     <%} %>  
			       <li  class="bg_image" onclick="gotoUrl('sys/listTeacher.action','查询教师')">查询教师</li>
				</ul>
			</div>
			<div id="menu7" class="list_detail" style="display:none;">
				<ul>
				<% if(obj instanceof User){ %>
			       <li  class="bg_image" onclick="gotoUrl('sys/scoreRank.action','专业成绩排名')">总成绩排名</li>
			     <%} %>  
			       <li  class="bg_image" onclick="gotoUrl('sys/singleScoreRank.action','单科排名')">单科排名</li>
			        <li  class="bg_image" onclick="gotoUrl('sys/noPassRank.action','不及格学生')">不及格学生</li>
				</ul>
			</div>
		</div>
	</div>
  </div>
</body>
</html>